package org.hawk.gwtppc.webtest.tests.methodsuite;

import java.util.Arrays;

import org.hawk.gwtppc.webtest.common.Asserts;
import org.hawk.gwtppc.webtest.common.Test;
import org.hawk.gwtppc.webtest.tests.mock.SubClassMock2;

public class GetParameterTypesTest implements Test {

	public void run() throws Throwable {
		Asserts.assertTrue(SubClassMock2.class.getDeclaredMethod("processValue").getParameterTypes().length == 0);
		Asserts.assertTrue(Arrays.equals(SubClassMock2.class.getDeclaredMethod("processValue", int.class).getParameterTypes(), 
				new Class[]{ int.class }));
		Asserts.assertTrue(Arrays.equals(SubClassMock2.class.getDeclaredMethod("processValue", int.class, Object.class)
				.getParameterTypes(), new Class[]{ int.class, Object.class }));
		Asserts.assertTrue(Arrays.equals(SubClassMock2.class.getDeclaredMethod("processValue", int.class, Object.class, 
				SubClassMock2.class).getParameterTypes(),  new Class[]{ int.class, Object.class, SubClassMock2.class }));
	}

	public String getName() {
		return "getParameterTypes()";
	}

}
